rename tomiles to radtomiles to better reflect its function
authorparkrrrr <parkrrrr@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 6 Apr 2006 21:03:40 +0000 (21:03 +0000)
committerparkrrrr <parkrrrr@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 6 Apr 2006 21:03:40 +0000 (21:03 +0000)
gpsbabel/arcdist.c
gpsbabel/csv_util.c
gpsbabel/grtcirc.c
gpsbabel/grtcirc.h
gpsbabel/interpolate.c
gpsbabel/position.c
gpsbabel/saroute.c
gpsbabel/smplrout.c

index d6b322a645505f72e19f38ab8c57f2a24143bbb7..52a34fb0cdf33ca3c19398332d8cfba348422f63 100644 (file)
@@ -110,7 +110,7 @@ arcdist_process(void)
                   }
 
                   /* convert radians to float point statute miles */
-                  dist = tomiles(dist);
+                  dist = radtomiles(dist);
 
                   if ( ed->distance > dist ) {
                        ed->distance = dist;
index 9a5a78d7554f52f7c872e258eef213e37f815666..75df54db79d75d29455c0eb8cf7d2b4bab26f052 100644 (file)
@@ -1057,7 +1057,7 @@ xcsv_waypt_pr(const waypoint *wpt)
     queue *elem, *tmp;
     
     if ( oldlon < 900 ) {
-       pathdist += tomiles(gcdist(oldlat*M_PI/180,oldlon*M_PI/180,
+       pathdist += radtomiles(gcdist(oldlat*M_PI/180,oldlon*M_PI/180,
                        wpt->latitude*M_PI/180,wpt->longitude*M_PI/180));
     }
     oldlon = wpt->longitude;
index 69d1c501dcadecd6edfb3bda18ef59916d83a1ce..0a686bfc6c9b2d794fffa2a1bddc0f3eda42c0c4 100644 (file)
@@ -46,7 +46,7 @@ static double dotproduct( double x1, double y1, double z1,
  * time, so why not leave the expression human-readable?
  */
 
-double tomiles( double rads ) {
+double radtomiles( double rads ) {
     const double radmiles = 6378137.0*100.0/2.54/12.0/5280.0;
     return (rads*radmiles);
 }
index 250e0d2ab4941960f8edbcc8f466df0f2e784bd0..ddd37401b6b0a277e38b9af45ffbfec0eb76bf1c 100644 (file)
@@ -24,7 +24,7 @@ double linedist(double lat1, double lon1,
                double lat2, double lon2,
                double lat3, double lon3 );
 
-double tomiles( double rads );
+double radtomiles( double rads );
 
 void linepart(double lat1, double lon1,
                double lat2, double lon2,
index 9a4755bb71102a8b11fd130d656f9954983ecb5c..f5a1d9c4ae4e12882e2a84ff0df7fd28d09a00df 100644 (file)
@@ -104,7 +104,7 @@ interpfilt_process(void)
                            rt2 = wpt->latitude * M_PI / 180;
                            rn2 = wpt->longitude * M_PI / 180;
                            curdist = gcdist( rt1, rn1, rt2, rn2 );
-                           curdist = tomiles(curdist);
+                           curdist = radtomiles(curdist);
                            if ( curdist > dist ) {     
                              for ( distn = dist; 
                                        distn < curdist;
index 1d62fd04a73071380f109aa3586f93ac00f74e55..87daf7e0c30663bb182a191d5ae04a7052d1b30e 100644 (file)
@@ -159,7 +159,7 @@ position_runqueue(queue *q, int nelems, int qtype)
                                   comp[i]->longitude);
 
                /* convert radians to integer feet */
-               dist = (int)(5280*tomiles(dist));
+               dist = (int)(5280*radtomiles(dist));
                
                if (dist <= pos_dist) {
                        switch (qtype) {
@@ -297,7 +297,7 @@ radius_process(void)
                                   home_pos->longitude);
 
                /* convert radians to float point statute miles */
-               dist = tomiles(dist);
+               dist = radtomiles(dist);
 
                if ((dist >= pos_dist) == (exclopt == NULL)) {
                        waypt_del(waypointp);
index 168501857e56fec4fb5e510992d8b80939c06234..196565f252bc6a21287845efc8947eabb97679f0 100644 (file)
@@ -366,7 +366,7 @@ my_read(void)
                                }
                                if ( times ) {
                                        if ( !first ) {
-                                          double dist = tomiles(gcdist( 
+                                          double dist = radtomiles(gcdist( 
                                                lat*M_PI/180, -lon*M_PI/180, 
                                                oldlat*M_PI/180, 
                                                -oldlon*M_PI/180 ));    
index 9bf0facfbf778fa05870455813b0d90ce087d653..e8245219994daaad7f1bc0e376f65339c7090d35 100644 (file)
@@ -144,13 +144,13 @@ compute_xte( struct xte *xte_rec ) {
        wpt2 = xte_rec->intermed->next->wpt;
        
        if ( xteopt || !lenopt ) {
-               xte_rec->distance = tomiles(linedist( 
+               xte_rec->distance = radtomiles(linedist( 
                        wpt1->latitude, wpt1->longitude, 
                        wpt2->latitude, wpt2->longitude,
                        wpt3->latitude, wpt3->longitude ));
        } 
        else {
-               xte_rec->distance = tomiles( 
+               xte_rec->distance = radtomiles( 
                       gcdist( wpt1->latitude, wpt1->longitude, 
                               wpt3->latitude, wpt3->longitude ) +
                       gcdist( wpt3->latitude, wpt3->longitude,